//
//								Application.h
//

#ifndef __NEWA_APPLICATION_H
#define __NEWA_APPLICATION_H

#pragma message( "INCLUDING FILE: " __FILE__ )

#include <memory>
#include <loki/Singleton.h>

namespace newa
{
	class AppImpl;

	class Application
	{
	public:
		Application();
		int run();
		//void exit(); TODO: implement ( exit(0) or PostQuitMessage(0) )

		std::auto_ptr<AppImpl>& getImpl()
		{
			return m_impl;
		}
	private:
		std::auto_ptr<AppImpl> m_impl;
	};

	inline Application& appInstance()
	{
		return Loki::SingletonHolder<Application>::Instance();
	}
}

#endif
